import axiosApi from './AxiosApi.js'

const apiList = {
    page: {
        method: 'GET',
        url: `/web-manager/transfor-center/bussiness/truck/page`
    },
    save: {
        method: 'POST',
        url: `/web-manager/transfor-center/bussiness/truck`
    },
    update: {
        method: 'PUT',
        url: `/web-manager/transfor-center/bussiness/truck`
    },
    delete: {
        method: 'DELETE',
        url: `/web-manager/transfor-center/bussiness/truck`
    },
    reset: {
        method: 'GET',
        url: `/authority/user/reset`
    },
}

export default {
    page (data) {
        return axiosApi({
            ...apiList.page,
            formData: true,
            data
        })
    },
    save (data) {
        return axiosApi({
            ...apiList.save,
            data
        })
    },
    update (data) {
        return axiosApi({
            ...apiList.update,
            data
        })
    },
    delete (data) {
        return axiosApi({
            ...apiList.delete,
            data
        })
    },
    reset (data) {
        return axiosApi({
            ...apiList.reset,
            data
        })
    }
}
